Image processing apparatus, method of controlling the same, and storage medium

ABSTRACT

The CPU of an image processing apparatus (MFP), when the MFP shifts to a first sleep mode, sets a time until, in the first sleep mode, the storage device stops rotation of a spindle motor to shift to a power saving mode. The CPU controls the storage device to shift to the power saving state at a timing at which the set time has elapsed after the MFP shifts to the first sleep mode.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to an image processing apparatus, a methodof controlling the same, and a storage medium.

Description of the Related Art

Image forming apparatuses such as a printer or MFP are equipped with asecondary storage device for storing data such as image data or settingdata. As secondary storage devices, HDDs (hard disk drive) are widelyused, and there are also cases in which SSDs (solid-state drive) areused. There is a tendency for a secondary storage device to have ashorter lifetime than other devices within the image forming apparatus.

With HDDs that are used for secondary storage devices, a high powersaving effect is expected according to an on/off operation(active/stopped) on a power supply. In Japanese Patent Laid-Open No.2007-164738, for an image processing apparatus equipped with a pluralityof HDDs, a technique for controlling a timing at which to activate andstop each HDD is disclosed. The image processing apparatus of JapanesePatent Laid-Open No. 2007-164738 stops the operation of the plurality ofHDDs at a time of a shift to an energy saving mode (power saving mode).Additionally, the image processing apparatus activates an HDD, in whichsystem data is stored, at a time of returning from the power saving modeand activates an HDD, in which spool data is stored, at a time of anaccess to the HDD. By this, HDD reliability and lifetime are improvedwhile avoiding, as much as possible, a deterioration in HDD accessresponse.

The HDD causes a magnetic disk to rotate by a motor (spindle motor), andperforms reading/writing of data with respect to a magnetic disk bycausing a magnetic head arm to physically move. Based on the durabilityof such components in the HDD, there is a limit to the number of timesan on/off operation for the HDD can be executed, and the execution ofthe on/off operation affects the lifetime of the HDD. As in the abovedescribed conventional art, when operation of the HDD (operation of themotor that causes the magnetic disk to rotate) is frequently caused tostop in synchronization with the image processing apparatus shifting tothe power saving mode, the lifetime of the HDD may become shorter. As aresult, there is a possibility that the HDD will reach the end of itslifetime before the actual image processing apparatus in which the HDDis mounted.

SUMMARY OF THE INVENTION

The present invention was conceived in view of the above describedissues. The present invention provides a technique that enables powersaving control of a storage device to be performed in a power savingmode while considering the lifetime of the storage device mounted to animage processing apparatus.

According to one aspect of the present invention, there is provided animage processing apparatus comprising: a storage device including amagnetic disk and a motor that causes the magnetic disk to rotate; asetting unit configured to set a time related to shifting, which is atime until the storage device shifts to a power saving state by stoppingoperation of the rotation of the motor after causing the operation tocontinue in a first power saving mode in which supply of power to somedevices that the image processing apparatus includes is stopped; and acontrol unit configured to control the storage device so as to shift tothe power saving state at a timing at which the time set by the settingunit has elapsed from when the image processing apparatus shifted to thefirst power saving mode.

According to another aspect of the present invention, there is provideda method for controlling an image processing apparatus that includes astorage device including a magnetic disk and a motor for causing themagnetic disk to rotate, the method comprising: setting a time relatedto shifting which is a time until the storage device shifts to a powersaving state by stopping operation of the rotation of the motor aftercausing the operation to continue in a first power saving mode in whicha supply of power to some devices that the image processing apparatusincludes is stopped; and controlling the storage device so as to shiftto the power saving state at a timing at which the time set in thesetting step has elapsed from when the image processing apparatusshifted to the first power saving mode.

According to still another aspect of the present invention, there isprovided a non-transitory computer-readable storage medium storing acomputer program for causing a computer to execute a method forcontrolling an image processing apparatus that includes a storage deviceincluding a magnetic disk and a motor for causing the magnetic disk torotate, the method comprising: setting a time related to shifting whichis a time until the storage device shifts to a power saving state bystopping operation of the rotation of the motor after causing theoperation to continue in a first power saving mode in which a supply ofpower to some devices that the image processing apparatus includes isstopped; and controlling the storage device so as to shift to the powersaving state at a timing at which the time set in the setting step haselapsed from when the image processing apparatus shifted to the firstpower saving mode.

By virtue of the present invention, it becomes possible to perform powersaving control of a storage device in a power saving mode whileconsidering the lifetime of the storage device mounted to an imageprocessing apparatus.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a configuration example of an MFP 10 (an imageprocessing apparatus).

FIG. 2 is a block diagram that illustrates a configuration example of acontroller unit 1.

FIG. 3 illustrates power saving control in the MFP 10.

FIG. 4 illustrates an example of operation states of a storage device16.

FIG. 5 is a flowchart which describes a procedure for power savingcontrol of the MFP 10 (First Embodiment).

FIG. 6 is a flowchart which describes a procedure for power savingcontrol of the MFP 10 (Second Embodiment).

DESCRIPTION OF THE EMBODIMENTS

Hereinafter, embodiments of the present invention will be described indetail with reference to the accompanying drawings. It should be notedthat the following embodiments are not intended to limit the scope ofthe appended claims, and that not all the combinations of featuresdescribed in the embodiments are necessarily essential to the solvingmeans of the present invention.

First Embodiment

In the first embodiment, description is given regarding a multi functionperipheral (MFP), which is an image forming apparatus having multiplefunctions such as a print function, a copy function, a scan function, animage transmission function, and an image saving function, as oneexample of an image processing apparatus. Note that the presentembodiment can be similarly applied, not only to an MFP, but also to animage processing apparatus or information processing apparatus such as aprinting apparatus (printer), a copying machine, a facsimile apparatus,or a PC.

<MFP>

FIG. 1 illustrates an example of a configuration of an MFP 10 accordingto the present embodiment. The MFP 10 is configured with a controllerunit 1, a scanner unit (an image reading unit) 2, and a printer unit 3.The controller unit 1 includes a CPU 11 (FIG. 2) and controls the MFP 10as a whole. An operation unit 4 for receiving a user operation and anauthentication input unit 9 for receiving authentication informationinput for user authentication are arranged in the controller unit 1. Theauthentication input unit 9 is, for example, a card reader that readsthe authentication information from an ID card in which userauthentication information is written. The MFP 10 includes acommunication I/F which is connected to a network such as a LAN, and cancommunicate with an external apparatus such as a PC 20 via the network.

The scanner 2 reads an image of an original document optically andgenerates image data corresponding to the image. The scanner 2 transmitsthe generated image data to the controller unit 1. The printer unit 3includes a sheet cassette (a feeding unit) 5, a printer engine 6, and adischarge tray (a discharge unit) 7. The printer unit 3 feeds a sheetfrom the sheet cassette 5, forms an image on the sheet by the printerengine 6, and discharges the sheet on which the image is formed to thedischarge tray 7. The printer unit 3 performs image formation based onimage data that was received from the controller unit 1. Note, theprinter engine 6 performs image formation by an electrophotographicprocess, for example.

The controller unit 1 can realize a copy function by causing the printerunit 3 to execute image formation based on image data obtained by thescanner 2 reading an image of an original. Also, the controller unit 1can realize a print function by causing the printer unit 3 to executeimage formation based on image data received from an external apparatussuch as the PC 20.

Also, the controller unit 1 can realize an authenticated print byallowing the printer unit 3 to start image formation (printing) which isbased on image data received from an external apparatus, aftercompletion of a user authentication which is based on authenticationinformation inputted from the authentication input unit 9. By theauthenticated print, a user who caused image data (print data) to betransmitted from the PC 20 to the MFP 10 can cause a print to start byoperating the MFP 10. By this, a situation such as when confidentialprinting materials that were outputted from the MFP 10 are left at theMFP 10 can be prevented.

<Controller Unit>

FIG. 2 is a block diagram that illustrates a configuration example ofthe controller unit 1 and also illustrates a configuration regarding asupply of power to each device in the MFP 10 from a power supply unit18. The controller unit 1 includes, in addition to the operation unit 4and the authentication input unit 9, the CPU 11, a sleep button 12, amemory 15, and storage device (storage) 16. Note that FIG. 2 illustratesdevices related to power saving control of the MFP 10 according to thepresent embodiment; the controller unit 1 may also include devices otherthan the devices that are illustrated in FIG. 2 (a communication I/F,for example).

The memory 15 is used as a work memory of the CPU 11. The CPU 11 isconnected with the scanner 2, the printer unit 3, the operation unit 4,the authentication input unit 9, the sleep button 12, the storage device16, and the power supply unit 18. Additionally, the CPU 11 can controlFET-SWs (switches) 1-3 and a relay 21. The FET-SWs 1-3 are semiconductorswitching elements and, in the present embodiment, are each configuredfrom a FET (a field-effect transistor).

The sleep button 12 is operated by a user in order to instruct the MFP10 to shift to the sleep mode (the power saving mode) or to return fromthe sleep mode. The MFP 10 shifts from an idle mode to a sleep mode ifthe sleep button 12 is pressed when the MFP 10 is in the idle mode. Onthe other hand, the MFP 10 shifts (returns) from the sleep mode to theidle mode the sleep button 12 is pressed when the MFP 10 is in the sleepmode. The operation unit 4 includes a liquid crystal display (LCD) thathas a touch panel function. The CPU 11 displays various operationscreens on the operation unit 4 based on operation of the MFP 10 andreceives an instruction from a user via the displayed the operationscreen.

The storage device 16 may be configured with an HDD (hard disk drive) oran SSD (solid-state drive). The HDD is a storage device of a typeconfigured by a magnetic disk, and the SSD is a storage device of a typeconfigured by a semiconductor memory. In the storage device 16, variousdata such as image data or setting data can be stored. For example, whenthe MFP 10 executes a copy operation, the storage device 16 can be usedfor temporarily storing image data obtained by reading an original imagein the scanner 2. In such a case, the CPU 11 reads image data stored inthe storage device 16 and causes the printer unit 3 to execute imageformation by transmitting the image data to the printer unit 3. Duringthis time, the CPU 11 displays on the operation unit 4 a screenindicating that a copy operation is being executed.

In the MFP 10 of the present embodiment, the supply of power from thepower supply unit 18 to each device is controlled for device groups A toD respectively (for each device group) illustrated in FIG. 2. Devicegroup A includes the operation unit 4 and the CPU 11. Device group Bincludes the authentication input unit 9 and the memory 15. Device groupC includes the storage device 16. Device group D includes the scanner 2and the printer unit 3.

The fat arrows in FIG. 2 indicate the supply paths of power from thepower supply unit 18 to the device groups A to D. Note that poweroutputted from the power supply unit 18 to the relay 21 is distributedto the three FET-SWs 1 to 3. Power is supplied from the power supplyunit 18 to the operation unit 4 and the CPU 11 included in the devicegroup A via the relay 21 and the FET-SW 3. Power is directly suppliedfrom the power supply unit 18 to the authentication input unit 9 and thememory 15 included in the device group B. Power is supplied from thepower supply unit 18 to the storage device 16 included in the devicegroup C via the relay 21 and the FET-SW 1. Power is supplied from thepower supply unit 18 to the scanner 2 and the printer unit 3 included inthe device group D via the relay 21 and the FET-SW 2.

The FET-SWs 1-3 are switches that are switched between on/off states(opened/closed states) by the CPU 11. The CPU 11 can control the stateof the supply of power (on/off state) to devices included in the devicegroup connected to the respective FET-SW by controlling the on/off stateof the respective FET-SW. Specifically, the CPU 11 can control thesupply of power to the device group A (the operation unit 4 and the CPU11) by using the FET-SW 3, can control the supply of power to the devicegroup C (the storage device 16) by using the FET-SW 1, and can controlthe supply of power to the device group D (the scanner 2 and the printerunit 3) by using the FET-SW 2. Note that power is always supplied fromthe power supply unit 18 to the device group B while the MFP 10 isactive (while the MFP 10 is in a power on state).

<Power Saving Control>

FIG. 3 illustrates power saving control in the MFP 10 and illustratesthe device groups to which power is supplied (that are energized) fromthe power supply unit 18 for each power mode according to the presentembodiment. Note that, in this figure, “∘” indicates energization, “x”indicates no energization, and “Δ” indicates energization but with powersaving operation being performed. In the present embodiment, the MFP 10has three power modes (operation modes): “an idle mode”, “a first sleepmode” (a first power saving mode), and “a second sleep mode” (a secondpower saving mode). The MFP 10, by switching power modes in accordancewith the operation state thereof, realizes power saving control forsaving power.

The idle mode is a power mode in which a user can operate the operationunit 4 and in which execution of a print job is possible. The firstsleep mode is a power mode in which though operation of the scanner 2and the printer unit 3 is stopped, operation of the CPU 11 and someperipheral devices thereof is enabled in order to perform a serveroperation of receiving a request from an external apparatus via thenetwork. In the first sleep mode, the power consumption of the MFP 10 islower than in the idle mode. The second sleep mode is a power mode inwhich operation of the CPU 11 is also stopped. In the second sleep mode,the power consumption of the MFP 10 is lower than in the first sleepmode.

In the present embodiment, the first sleep mode is one example of afirst power saving mode in which the supply of power to some devicesthat the image processing apparatus (the MFP 10) is equipped with isstopped. Also, the second sleep mode is one example of a second powersaving mode in which, in addition to the above some devices, the supplyof power to the CPU 11 and the storage device 16 is stopped. The CPU 11performs a switching of the power modes of the MFP 10 by the processingdescribed hereinafter.

(Shift from the Idle Mode to the First Sleep Mode)

In the idle mode, the CPU 11 shifts the MFP 10 from the idle mode to thefirst sleep mode when the sleep button 12 is pressed by the user.Specifically, the CPU 11 stops the supply of power to the device group D(the scanner 2 and the printer unit 3) by putting the FET-SW 2 into anoff state. Meanwhile, the CPU 11 keep the FET-SWs 1 and 3 in an onstate. For this reason, the supply of power to the device groups A andC, in addition to the device group B, is continued. However, the CPU 11instructs the operation unit 4 to turn off the LCD backlight in a statewhere the supply of power to the operation unit 4 is continued. By this,power consumption of the operation unit 4 is reduced. By the above, ashift from the idle mode to the first sleep mode completes. Note that,in the first sleep mode, the CPU 11 can perform power saving control ofthe storage device 16 by controlling the state of the storage device 16in States 1 to 4 (FIG. 4), which are described later.

In the first sleep mode, the supply of power to the device groups A andB is continued as illustrated in FIG. 3. This is to enable execution ofa background service such as network processing (processing forreceiving a request from the external apparatus via the network, forexample). In a case where the storage device 16 is not used duringexecution of a background service, the CPU 11 can cause the storagedevice 16 to shift to a power saving state (State 3 of FIG. 4, forexample) even in the first sleep mode. As a result, additional powersaving of the MFP 10 can be realized.

(Shift from the First Sleep Mode to the Second Sleep Mode)

In a case where a particular condition is satisfied, such as a casewhere execution of the foregoing background service becomes unnecessary,the CPU 11 causes the MFP 10 to shift from the first sleep mode to thesecond sleep mode. Specifically, the CPU 11 can stop the supply of powerto each FET-SW by putting the relay 21 into an off state. As a result,the supply of power to the device groups A, C, and D is stopped.

Also, the CPU 11 controls each device included in the device group B soas to perform a low power consumption operation (power savingoperation). Specifically, the CPU 11 instructs the authentication inputunit 9 to operate at a low clock frequency and instructs the memory 15to operate in a self-refresh mode. By the above, a shift from the firstsleep mode to the second sleep mode completes.

(Shift from the Second Sleep Mode to the Idle Mode)

In the second sleep mode, the MFP 10 shifts (returns) from the secondsleep mode to the idle mode when the sleep button 12 is pressed by theuser. In the second sleep mode, the CPU 11 cannot perform any processingin response to the pressing of the sleep button 12 because the supply ofpower to the CPU 11 is stopped. For this reason, the relay 21 switchesfrom an off state to an on state by a signal supplied from the sleepbutton 12 to the relay 21 being asserted. As a result, the supply ofpower from the power supply unit 18 via the relay 21 to each FET-SW isresumed. The supply of power to the device groups A, C, and D is resumedby each FET-SW starting operation in an on state as an initial state.When the supply of power to the CPU 11 via the FET-SW 3 is resumed, theCPU 11 starts operation, and the shift from the second sleep mode to theidle mode completes.

<Operation State of the Storage Device 16>

FIG. 4 illustrates an example of operation states of the storage device16. The state of the storage device 16 of the present embodimenttransitions between States 1 to 4, illustrated in FIG. 4, in accordancewith the state of the FET-SW 1 and an instruction from the CPU 11. In acase where the FET-SW 1 is in an on state, the power is supplied fromthe power supply unit 18 to the storage device 16. At that time, thestorage device 16 is in one of States 1 to 3. If the FET-SW 1 enters anoff state, the supply of power from the power supply unit 18 to thestorage device 16 is stopped, and the storage device 16 enters State 4.

The storage device 16 is equipped with a spindle motor. The spindlemotor is a motor for rotating the magnetic disk (magnetic rotarymember). Also, the storage device 16 has a power saving timer which is atimer function used in measuring the time until the storage device 16shifts to the power saving state (stops operation of the rotation of thespindle motor). It can be switched by a power saving command from theCPU 11 whether the power saving timer is on/off (enabled/disabled). Notethat it is possible to use a general-purpose command for the powersaving command from the CPU 11 to the storage device 16 as describedlater.

In a case where the power saving timer is in an on state, the storagedevice 16 measures, by the power saving timer, a continuous period overwhich a state in which external access to (a storage area of) thestorage device 16 does not occur. Furthermore, when the measurement timereaches a time (power saving shift time) set by the power saving commandfrom the CPU 11, the storage device 16 autonomously shifts to the powersaving state. Specifically, the storage device 16 realizes a reductionin power consumption of the storage device 16 by causing the operationof the spindle motor to stop (putting it into an off state).Hereinafter, description is given regarding a relation between theforegoing States 1 to 4 and operation of the power saving timer and thespindle motor.

(State 1)

State 1 is a state in which power is being supplied to the storagedevice 16, and is a state in which either the power saving timer hasbeen set to be disabled by a power saving command from the CPU 11 or thepower saving command itself has not been received from the CPU 11.Because the spindle motor of the storage device 16 is in a state ofbeing rotated in State 1, the storage device 16 can immediately receiveexternal access (read access or write access). Also, because the powersaving timer is set to disabled, the storage device 16 does not stop theoperation of the spindle motor even if a state in which there is noaccess to the storage device 16 continues. When the storage device 16,in State 1, receives a power saving command in which enabling of thepower saving timer is set (a power saving shift time is set) from theCPU 11, the storage device 16 shifts to State 2.

(State 2)

State 2 is a state in which power is being supplied to the storagedevice 16 and is a state in which a power saving shift time set by apower saving command from the CPU 11 has not elapsed. Because thespindle motor of the storage device 16 is in a state of being rotated inState 2, the storage device 16 can immediately receive external access.When the power saving shift time elapses without external access to thestorage device 16 occurring in State 2, the storage device 16autonomously shifts to State 3.

(State 3)

State 3 is a state in which power is being supplied to the storagedevice 16 and is a state in which operation of the spindle motor of thestorage device 16 has been stopped. Because power is being supplied, thestorage device 16 can receive external access. However, becauseoperation of the spindle motor has been stopped, the storage device 16shifts to State 2 by causing the spindle motor to be activated upon anaccess request. When activation of the spindle motor of the storagedevice 16 completes, access to the storage area is performed. Note thatthe CPU 11 is not aware of the processing for shifting to State 2 fromState 3 performed within the storage device 16. For this reason, a delayaccompanying the processing for shifting from State 3 to State 2 is seenin the CPU 11 as a delay in access to the storage device 16.

(State 4)

In any of the States 1 to 3, the storage device 16 shifts to State 4 ifthe FET-SW 1 switches from an on state to an off state. State 4 is astate in which the supply of power to the storage device 16 has beenstopped. In this state, operation of the spindle motor is also stopped(an off state is entered). Also, because power is not being supplied,the storage device 16 cannot receive external access. In a case where anaccess request to the storage device 16 occurs, the CPU 11 causes thestorage device 16 to shift from State 4 to State 1 by switching theFET-SW 1 to the on state. By this, access to the storage device 16becomes possible.

<Example of a Power Saving Command>

Here, description is given regarding an example of the foregoing powersaving command issued from the CPU 11 to the storage device 16. Thepower saving command is specified in a manner dependent upon aninterface or the like for connecting between the storage device and theexternal apparatus. For example, the following two commands arespecified in an ATA standard:

FLUSH CACHE EXT & STANDBY IMMEDIATE (hereinafter, command 1); and

IDLE [STANDBY TIMER] (hereinafter, command 2).

Command 1 is a command for flushing a cache within the storage deviceand for requesting a shift to a state in which the power supply of thestorage device may enter the off state. Command 2 is a command forrequesting a shift, by adding a STANDBY TIMER parameter to an IDLEcommand, to an IDLE state after the time indicated by the STANDBY TIMERparameter elapses.

In a case where these commands are applied to the storage device 16 ofthe present embodiment, the CPU 11 can cause the storage device 16 toshift to the power saving state (State 3 or State 4) as follows. Forexample, in a case where the CPU 11 causes the storage device 16 toshift from any of the States 1 to 3 to State 4, it issues the foregoingcommand 1 to the storage device 16, and puts the FET-SW 1 into an offstate after preparation for putting the power supply of the storagedevice 16 into the off state completes. By this, the shift of thestorage device 16 to State 4 (power saving state) completes. In thisway, it is possible to cause the storage device 16 to safely shift to apower off state.

Also, in a case where the CPU 11 causes the storage device 16 to shiftfrom State 1 to State 3, it adds, to the foregoing command 2, theSTANDBY TIMER PARAMETER (T_offtime) that indicates the power savingshift time, and transmits this command 2 to the storage device 16. Bythis, the storage device 16 first shifts from State 1 to State 2.Furthermore, if the time T_offtime elapses without external accessoccurring, the storage device 16 causes operation of the spindle motorto stop. By this, the shift of the storage device 16 to State 3 (powersaving state) completes. Note that, if external access occurs, thestorage device 16 autonomously activates the spindle motor, and shiftsto State 2.

<Relationship Between the Lifetime of the MFP 10 and the Lifetime of theStorage Device 16>

Typically, for a component that performs physical operations, due towear-and-tear of the component itself, there is a limit to the number oftimes that it can properly operate, and that number of times may bespecified by a product specification. In a product specification of anHDD used as the storage device 16 of the present embodiment, 600,000times, for example, is specified as the number of times that the spindlemotor of the HDD can execute an on/off operation (C_s_life describedlater). In the MFP 10 in which the storage device 16 is installed, ifon/off operations on the spindle motor of the storage device 16 arefrequently executed, the lifetime of the storage device 16(specifically, the duration until the storage device 16 malfunctions)may become shorter. Accordingly, the result may be that the storagedevice 16 reaches the end of its lifetime before the MFP 10 in which thestorage device 16 is installed reaches the end of its lifetime.

In addition to the HDD, the relay 21 is among the components used in theMFP 10 that perform physical operations. Although the relay 21 cancontrol the on/off state of a large current, there is a limit to thenumber of times (300,000 times, for example) that it can switch theon/off states based on the durability of physically contacting portions.In the MFP 10 of the present embodiment, switching of the on/off statesof the relay 21 is performed to cause the power mode to shift betweenthe idle mode or the first sleep mode and the second sleep mode. Forthis reason, if shifting to the second sleep mode is frequentlyexecuted, the result may be that the lifetime of the relay 21 becomesshorter and that the relay 21 reaches the end of its lifetime before theMFP 10 reaches the end of its lifetime. The on/off operations of the HDDoccur in coordination with the switching of the on/off states of therelay 21. Specifically, switching of the on/off states of the relay 21influences the lifetime of the HDD.

Thus, in the present embodiment, power saving control of the storagedevice is performed such that the storage device 16 does not reach theend of its lifetime before the MFP 10 reaches the end of its lifetimedue to on/off operations of the spindle motor of the storage device 16being frequently executed.

Specifically, the CPU 11 sets a time related to shifting (the powersaving shift time T_offtime) which is a time until the storage device 16shifts to the power saving state by stopping operation of the rotationof the spindle motor after causing that operation to continue in thefirst sleep mode. The time T_offtime is a time related to shifting ofthe storage device 16 to the power saving state, and may be set based ona parameter (such as T_p_life which is described later) relating to thelifetime of the storage device 16 such that the storage device 16 doesnot reach the end of its lifetime before the MFP 10 reaches the end ofits lifetime. Additionally, the CPU 11 controls the storage device 16 toshift to the power saving state (State 3 or State 4) at a timing atwhich the set time T_offtime has elapsed after the MFP 10 shifts to thefirst sleep mode. In this way, power saving control of the storagedevice 16 can be performed in the first sleep mode considering thelifetime of the storage device 16 installed in the MFP 10.

<Procedure for Power Saving Control>

FIG. 5 is a flowchart which describes a procedure for power savingcontrol of the MFP 10. The processing of each step of FIG. 5 is realizedby the CPU 11 reading a control program stored in the storage device 16into the memory 15 and executing the program. In the present embodiment,power saving of the storage device 16 is realized by controlling, aftera shift to the above described first sleep mode, the FET-SW 1 to causethe storage device 16 to shift from State 1 to State 4.

The CPU 11 starts processing by the procedure of FIG. 5 when shiftingfrom the idle mode to the first sleep mode. Firstly, in step S101, theCPU 11 determines whether or not the storage device 16 is an HDD. Forexample, the CPU 11 issues an IDENTIFY DEVICE command to the storagedevice 16 and then receives a response to the command from the storagedevice 16. Furthermore, the CPU 11 obtains apparatus information of thestorage device 16 from the received response and determines the type ofthe storage device 16 based on the apparatus information. The CPU 11advances the processing to step S102 in a case where the storage device16 is not an HDD (is an SSD), and advances the processing to step S103in a case where the storage device 16 is an HDD.

In step S102 to step S104, the time T_offtime until the start ofprocessing for causing the storage device 16 to shift to the powersaving state (State 4) after shifting to the first sleep mode is set. Ina case where the storage device is an SSD, the CPU 11 sets a valuedefined in advance to the time T_offtime in step S102. This value isuniquely defined for an SSD which is a type of storage device whoselifetime is not influenced by on/off operations. After this, the CPU 11advances the processing to step S105.

Meanwhile, in a case where the storage device 16 is an HDD, the CPU 11,in step S103, decides an upper limit value C_s1_max of the (accumulated)number of times that an on/off operation (operation in which a power offstate is shifted to and a power on state is returned to) of the storagedevice 16 is executed in the first sleep mode of the MFP 10. C_s1_max isdecided by subtracting C_s2_max from C_st_life using the followingequation.

C_s1_max=C_st_life−C_s2_max   (1)

In Equation (1), C_st_life is a parameter relating to the lifetime ofthe storage device 16 and is a parameter indicating the number of timesthat an on/off operation can be executed until the storage device 16reaches the end of its lifetime. C_st_life is defined based oninformation such as the model number/type of the HDD. Also, C_s2_max isan upper limit value of the (accumulated) number of times that the MFP10 shifts to the second sleep mode. As described above, switching of therelay 21 to the off state is performed in order to shift the MFP 10 tothe second sleep mode. For this reason, in the present embodiment, thenumber of times that switching between the on state and the off statecan be executed until the relay 21 reaches its lifetime is set toC_s2_max. This number of times is defined in advance as a productspecification of the MFP 10.

Next, in step S104, the CPU 11 sets the time T_offtime based on aparameter T_p_life and the parameter C_s1_max which was decided by usingEquation (1). T_offtime is set by using the following equation.

T_offtime=T_p_life/C_s1_max   (2)

In Equation (2), T_p life is a parameter indicating a time determined inadvance as a time until the MFP 10 in which the storage device 16 isinstalled will reach the end of its lifetime. The time T_offtimecorresponds to a time over which the storage device 16 is maintained inthe on state without being shifted to the off state (specifically, arotation operation is caused to continue without stopping the spindlemotor) after the MFP 10 shifts to the first sleep mode. According toEquation (2), T_offtime is set such that the storage device 16, in thefirst sleep mode, is caused to shift to the power saving state (State 4)at a frequency at which the number of on/off operations of the storagedevice 16 does not reach the upper limit value C_s1_max before the MFP10 reaches the end of its lifetime. After this, the CPU 11 advances theprocessing to step S105.

In step S105, the CPU 11 performs processing for shifting to the firstsleep mode. Specifically, the CPU 11 stops the supply of power to thescanner 2 and the printer unit 3 (the device group D of FIG. 2) byputting the FET-SW 2 into an off state. Also, the CPU 11 causes theoperation unit 4 to turn off the LCD backlight. By this, the shift tothe first sleep mode of the MFP 10 completes. Additionally, in stepS106, the CPU 11 starts measurement of the time that has elapsed fromwhen the first sleep mode is shifted to. By this, measurement of thetime T_offtime set in step S102 or step S104 is performed. After this,the CPU 11 causes the storage device 16 to shift to the power savingstate (State 4) when the time that has elapsed during the measurementreaches the time T_offtime.

In step S107, the CPU 11 determines whether or not the time that haselapsed during the measurement has reached the time T_offtime(specifically, whether or not after shifting to the first sleep mode,the time T_offtime has elapsed). In a case where the time T_offtime hasnot elapsed, the CPU 11 advances the processing to step 5109. On theother hand, in a case where the time T_offtime has elapsed, the CPU 11advances the processing to step S108.

In step S108, the CPU 11 causes the storage device 16 to shift to thepower saving state (State 4) by putting the FET-SW 1 into an off state.By this, the supply of power to the storage device 16 is stopped andpower ceases to be consumed by the storage device 16. In a case wherethe storage device 16 is an HDD, operation of the rotation of thespindle motor is stopped. As a result, the power consumption of the MFP10 is reduced. In this way, when the MFP 10 shifts to the first sleepmode, the CPU 11 starts measuring the time and causes the storage device16 to shift to the power saving state by stopping the supply of power tothe storage device 16 when the measured time reaches the time T_offtime.After that, the CPU 11 advances the processing to step S109.

Note that, as described above, in order to safely shift the storagedevice 16 to the power off state, if the measured time reaches the timeT_offtime the CPU 11 may instruct the storage device 16, by the abovedescribed command 1, to prepare for stopping operation of the storagedevice 16. Additionally, if preparation of the storage device 16completes, the supply of power to the storage device 16 may be stopped.

In step S109, the CPU 11 determines whether or not the sleep button 12is pressed. If the sleep button 12 is pressed, the CPU 11 advances theprocessing to step S110, and if not pressed, advances the processing tostep S111. In step S110, the CPU 11 causes the MFP 10 to shift to theidle mode and then ends the processing. By this, the FET-SW 1 isswitched to the on state and the supply of power to the storage device16 is resumed.

In step S111, the CPU 11 determines whether or not to cause the MFP 10to shift the second sleep mode. In a case where a predeterminedcondition for shifting to the second sleep mode is satisfied, the CPU 11determines to cause a shift to the second sleep mode and advances theprocessing to step S112. In step S112, the CPU 11 causes the MFP 10 toshift to the second sleep mode by putting the relay 21 into an offstate. Meanwhile, in a case where the predetermined condition is notsatisfied, the CPU 11 determines not to cause a shift to the secondsleep mode, and returns the processing to step S107. In such a case, theMFP 10 continues the first sleep mode until the sleep button 12 ispressed (“YES” in step S109) or the predetermined condition for shiftingto the second sleep mode is satisfied (“YES” in step S111).

As described above, in the present embodiment, the CPU 11 sets the timeT_offtime related to shifting which is a time until the storage device16 shifts to the power saving state by stopping operation of therotation of the spindle motor after causing that operation to continuein the first sleep mode. The time T_offtime is a time related toshifting of the storage device 16 to the power saving state, and may beset based on a parameter (such as T_p life) relating to the lifetime ofthe storage device 16 such that the storage device 16 does not reach theend of its lifetime before the MFP 10 reaches the end of its lifetime.Additionally, the CPU 11 controls the storage device 16 to shift to thepower saving state (State 3 or State 4) at a timing at which the settime T_offtime has elapsed after the MFP 10 shifts to the first sleepmode.

In this way, it becomes possible to perform the power saving control ofthe storage device 16 in the first sleep mode, considering the lifetimeof the storage device 16, by determining the time T_offtime which is forthe storage device 16 and which is used when the MFP 10 shifts to thefirst sleep mode. As a result, it is possible to prevent the storagedevice 16 from reaching the end of its lifetime before the MFP 10 inwhich the storage device 16 is installed reaches the end of itslifetime.

Note that, in a case where an SSD is used as the storage device 16, theon/off operation described above does not affect the lifetime of theSSD. For this reason, unlike the case of an HDD, it is possible to causethe storage device 16 to frequently shift to the power saving state byfixing the time T_offtime to a short time, and to thereby attain a highpower saving effect. Note that an SSD can shift to a power saving statereferred to as a DevSleep state.

Second Embodiment

In the first embodiment, power saving of the storage device 16 isrealized by using State 4 as illustrated in FIG. 4. In the secondembodiment, description is given of an example in which power saving ofthe storage device 16 is realized by using State 3 as illustrated inFIG. 4. Description is given below centered on points of difference withthe first embodiment.

<Procedure for Power Saving Control>

FIG. 6 is a flowchart illustrating a procedure of power saving controlof the MFP 10 according to the present embodiment. The processing ofeach step of FIG. 6 is realized by the CPU 11 reading a control programstored in the storage device 16 into the memory 15 and executing theprogram. In the present embodiment, after shifting to the first sleepmode described above, while the FET-SW 1 is maintained in an on state, apower saving command is transmitted from the CPU 11 to the storagedevice 16, and the storage device 16 is caused to shift to State 2, andthen is caused to shift to State 3.

Step S101 to step S105 are the same as in the first embodiment (FIG. 5)and thus description thereof is omitted. In the present embodiment, theCPU 11 advances the processing to step S201 after performing processingto shift to the first sleep mode in step S105. In step S201, when theMFP 10 shifts to the first sleep mode, the CPU 11 transmits to thestorage device 16 a power saving command for enabling a power savingtimer of the storage device 16. The power saving command is a commandthat includes a setting of the time T_offtime and that is forinstructing a shift to a power saving state. The CPU 11, by such a powersaving command, instructs the storage device 16 to autonomously shift tothe power saving state (State 3) if the elapsed time measured by thepower saving timer reaches the time T_offtime.

If the storage device 16 receives such a power saving command, it shiftsfrom State 1 to State 2 and enables the power saving timer as describedabove. Furthermore, the storage device 16 starts measurement of time bythe power saving timer and, when the time T_offtime set by the powersaving command has elapsed (when the measurement time reaches the timeT_offtime), shifts from State 2 to State 3 which is the power savingstate. In a case where the storage device 16 is an HDD, the storagedevice 16 shifts to the power saving state by causing the spindle motorto stop. In this way, in the present embodiment, the CPU 11 is able tomanage the time T_offtime until the storage device 16 shifts to thepower saving state (State 3) after the MFP 10 shifts to the first sleepmode.

Note that, if an access request occurs with respect to the storagedevice 16 in the power saving state (State 3), the storage device 16shifts to State 2 and accepts access to the storage area as describedabove. After this, if the time T_offtime elapses again, the storagedevice 16 autonomously shifts to the power saving state (State 3). Inthis way, power saving of the storage device 16 is realized.

After this, the CPU 11 performs the processing of step S109 to step S111which is the same as the processing in the first embodiment. Note that,in the case where the MFP 10 is not caused to shift to the second sleepmode in step S111, the processing returns to step S109. Also, when theCPU 11 causes the MFP 10 to shift to the idle mode in step S110, itdisables the power saving timer of the storage device 16 by a powersaving command such that, in the idle mode, the storage device 16 doesnot shift to the power saving state. By this, in the idle mode, thestorage device 16 maintains State 1, and does not shift to the powersaving mode by causing the spindle motor to stop.

As described above, similarly to in the first embodiment, the CPU 11sets the time T_offtime related to shifting which is a time until thestorage device 16 shifts to the power saving state by stopping operationof the rotation of the spindle motor after causing that operation tocontinue in the first sleep mode. Additionally, the CPU 11 controls thestorage device 16 to shift to the power saving state (State 4) at atiming at which the set time T offtime has elapsed after the MFP 10shifts to the first sleep mode. By virtue of the present embodiment,similarly to in the first embodiment, it becomes possible to perform thepower saving control of the storage device 16 in the first sleep mode,considering the lifetime of the storage device 16. As a result, it ispossible to prevent the storage device 16 from reaching the end of itslifetime before the MFP 10 in which the storage device 16 is installedreaches the end of its lifetime.

Other Embodiments

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully asanon-transitory computer-readable storage medium') to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2017-154732, filed Aug. 9, 2017, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. An image processing apparatus comprising: astorage device including a magnetic disk and a motor that causes themagnetic disk to rotate; a setting unit configured to set a time relatedto shifting, which is a time until the storage device shifts to a powersaving state by stopping operation of the rotation of the motor aftercausing the operation to continue in a first power saving mode in whichsupply of power to some devices that the image processing apparatusincludes is stopped; and a control unit configured to control thestorage device so as to shift to the power saving state at a timing atwhich the time set by the setting unit has elapsed from when the imageprocessing apparatus shifted to the first power saving mode.
 2. Theimage processing apparatus according to claim 1, wherein the settingunit sets the time related to shifting based on a parameter related to alifetime of the storage device, such that the storage device does notreach an end of its lifetime before the image processing apparatusreaches the end of its lifetime,.
 3. The image processing apparatusaccording to claim 1, wherein the control unit, when the imageprocessing apparatus shifts to the first power saving mode, startsmeasurement of time and if the measured time reaches the set time,causes the storage device to shift to the power saving state by stoppingsupply of power to the storage device.
 4. The image processing apparatusaccording to claim 3, wherein the control unit, when the measured timereaches the set time, instructs the storage device to performpreparation for stopping operation of the storage device, and when thepreparation completes, stops the supply of power to the storage device.5. The image processing apparatus according to claim 1, wherein thecontrol unit, when the image processing apparatus shifts to the firstpower saving mode, transmits to the storage device a command thatincludes a setting of the time related to shifting and that instructs ashift to the power saving state, and the storage device startsmeasurement of time when the command is received from the control unit,and shifts to the power saving state by stopping the rotation of themotor when the measured time reaches the time set in the command.
 6. Theimage processing apparatus according to claim 1, wherein the settingunit sets the time related to shifting based on a time determined inadvance as a time until the image processing apparatus reaches an end ofits lifetime and based on a first upper limit value, for the first powersaving mode, on a number of executions of an on/off operation in whichthe storage device shifts to a power off state and then returns to apower on state.
 7. The image processing apparatus according to claim 6,further comprising a second power saving mode for stopping supply ofpower to the control unit and the storage device in addition to the somedevices, wherein the setting unit determines the first upper limit valueby subtracting a second upper limit value on a number of times that theimage processing apparatus shifts to the second power saving mode, froma number of times that the on/off operation can be executed until thestorage device reaches the end of its lifetime.
 8. The image processingapparatus according to claim 7, further comprising a power supply unitand a relay for switching a state of supplying power from the powersupply unit to each device of the image processing apparatus between anon state and an off state, wherein the control unit causes the imageprocessing apparatus to shift to the second power saving mode byswitching the relay to the off state, and the second upper limit valueis the same as a number of times that switching between the off stateand the on state can be executed until the relay reaches the end of itslifetime.
 9. A method for controlling an image processing apparatus thatincludes a storage device including a magnetic disk and a motor forcausing the magnetic disk to rotate, the method comprising: setting atime related to shifting which is a time until the storage device shiftsto a power saving state by stopping operation of the rotation of themotor after causing the operation to continue in a first power savingmode in which a supply of power to some devices that the imageprocessing apparatus includes is stopped; and controlling the storagedevice so as to shift to the power saving state at a timing at which thetime set in the setting step has elapsed from when the image processingapparatus shifted to the first power saving mode.
 10. The method forcontrolling the image processing apparatus according to claim 9, whereinin the setting, the time related to shifting is set based on a parameterrelated to a lifetime of the storage device, such that the storagedevice does not reach an end of its lifetime before the image processingapparatus reaches the end of its lifetime.
 11. The method forcontrolling the image processing apparatus according to claim 9, whereinin the controlling, when the image processing apparatus shifts to thefirst power saving mode, measurement of time is started and when themeasured time reaches the set time, the storage device is caused toshift to the power saving state by stopping a supply of power to thestorage device.
 12. The method for controlling the image processingapparatus according to claim 11, wherein in the controlling, when themeasured time reaches the set time, the storage device is instructed toperform a preparation for stopping operation of the storage device, andwhen the preparation completes, the supply of power to the storagedevice is stopped.
 13. The method for controlling the image processingapparatus according to claim 9, wherein in the controlling, when theimage processing apparatus shifts to the first power saving mode, acontrol unit of the image processing apparatus transmits to the storagedevice a command that includes a setting of the time related to shiftingand that instructs a shift to the power saving state, and the storagedevice starts measurement of time when the command is received from thecontrol unit, and shifts to the power saving state by stopping therotation of the motor when the measured time reaches the time set in thecommand.
 14. The method for controlling the image processing apparatusaccording to claim 9, wherein in the setting, the time related toshifting is set based on a time determined in advance as a time untilthe image processing apparatus reaches an end its lifetime and based ona first upper limit value, for the first power saving mode, on a numberof executions of an on/off operation in which the storage device shiftsto a power off state and then returns to a power on state.
 15. Themethod for controlling the image processing apparatus according to claim14, wherein the image processing apparatus further comprises a secondpower saving mode for stopping a supply of power to the control unit andthe storage device in addition to the some devices, and in the setting,the first upper limit value is determined by subtracting a second upperlimit value on a number of times that the image processing apparatusshifts to the second power saving mode from a number of times that theon/off operation can be executed until the storage device reaches theend of its lifetime.
 16. The method for controlling the image processingapparatus according to claim 15, wherein the image processing apparatusfurther comprises a power supply unit and a relay for switching a stateof supplying power from the power supply unit to each device of theimage processing apparatus between an on state and an off state, and themethod for controlling further comprises causing the image processingapparatus to shift to the second power saving mode by switching therelay to the off state, and the second upper limit value is the same asa number of times that switching between the off state and the on statecan be executed until the relay reaches the end of its lifetime.
 17. Anon-transitory computer-readable storage medium storing a computerprogram for causing a computer to execute a method for controlling animage processing apparatus that includes a storage device including amagnetic disk and a motor for causing the magnetic disk to rotate, themethod comprising: setting a time related to shifting which is a timeuntil the storage device shifts to a power saving state by stoppingoperation of the rotation of the motor after causing the operation tocontinue in a first power saving mode in which a supply of power to somedevices that the image processing apparatus includes is stopped; andcontrolling the storage device so as to shift to the power saving stateat a timing at which the time set in the setting step has elapsed fromwhen the image processing apparatus shifted to the first power savingmode.